From e5c26fb2805e2f9abcea7ba52e42fff5fdb574a0 Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Tue, 6 Aug 2024 13:12:58 -0600 Subject: [PATCH] correct WGS84 semi minor axis value. (#1310) It appears the GSR80 value was used instead of the WGS84 value, which is a very small error. However, there was a typo in the value in GPS_Math_XYZ_To_WGS84LatLonH that resulted in an order of magnitude error! This could lead to GPS_Math_XYZ_To_WGS84LatLonH never converging. This may be why skytraq created their own function to convert ECEF to WGS84. --- jeeps/gpsmath.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jeeps/gpsmath.cc b/jeeps/gpsmath.cc index 8da383fa5..c97b6ad48 100644 --- a/jeeps/gpsmath.cc +++ b/jeeps/gpsmath.cc @@ -457,7 +457,7 @@ void GPS_Math_WGS84LatLonH_To_XYZ(double phi, double lambda, double H, double* x, double* y, double* z) { double a = 6378137.000; - double b = 6356752.3141; + double b = 6356752.314245; GPS_Math_LatLonH_To_XYZ(phi,lambda,H,x,y,z,a,b); @@ -510,7 +510,7 @@ void GPS_Math_XYZ_To_WGS84LatLonH(double* phi, double* lambda, double* H, double x, double y, double z) { double a = 6378137.000; - double b = 66356752.3141; + double b = 6356752.314245; GPS_Math_XYZ_To_LatLonH(phi,lambda,H,x,y,z,a,b); -- 2.30.2